package com._520it.crm.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Setter
@Getter
public class OrderBillQueryObject extends QueryObject {
    private String organizationNameD;   //机构部门名称
    private String productName;         //产品名称
    private String insureBillNumberD;   //投保单号
    private String aplicantName;        //投保人名称

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date inputBeginDateD;       //投保申请开始日期1

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date inputEndDateD;         //投保申请开始日期2

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date beginDateD;            //保险开始日期1

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endDateD;              //保险开始日期2


    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date writtenBeginDate;      //签单起止期1

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date writtenEndDate;        //签单起止期2

    private String carPlateNumberD;     //车牌号
    private String engineNumD;          //发动机号
    private String VIND;                //车架号
    private String recognizeeNameD;     //被保人名称
    private String employeeNameD;       //录入人名称
    private Long product;
    private String insureBillNumber;
    private String minDate;
    private String maxDate;
    private String applicationForms;
    private Long organizationName;
    private String aplicant;

    private Integer orderBillStatus;   //保单状态, 用来查询 待修改,待核保...的保单回显到页面
    private Integer reviseTemp; //判断是否为批改暂存保单

    public String getOrganizationNameD() {
        return StringUtils.isNotBlank(organizationNameD) ? organizationNameD : null;
    }

    public String getProductName() {
        return StringUtils.isNotBlank(productName) ? productName : null;
    }

    public String getInsureBillNumberD() {
        return StringUtils.isNotBlank(insureBillNumberD) ? insureBillNumberD : null;
    }

    public String getAplicantName() {
        return StringUtils.isNotBlank(aplicantName) ? aplicantName : null;
    }

    public String getCarPlateNumberD() {
        return StringUtils.isNotBlank(carPlateNumberD) ? carPlateNumberD : null;
    }

    public String getEngineNumD() {
        return StringUtils.isNotBlank(engineNumD) ? engineNumD : null;
    }

    public String getVIND() {
        return StringUtils.isNotBlank(VIND) ? VIND : null;
    }

    public String getRecognizeeNameD() {
        return StringUtils.isNotBlank(recognizeeNameD) ? recognizeeNameD : null;
    }

    public String getEmployeeNameD() {
        return StringUtils.isNotBlank(employeeNameD) ? employeeNameD : null;
    }


    public String getAplicant() {
        return StringUtils.isNotBlank(aplicant) ? aplicant : null;
    }

    public String getMinDate() {
        return StringUtils.isNotBlank(minDate) ? minDate : null;
    }

    public String getMaxDate() {
        return StringUtils.isNotBlank(maxDate) ? maxDate : null;
    }
}